<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE HTML>
<html>
  <head>
    <title>天安财险</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="天安财险">
    <link href="${ctxStatic }/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
	<script src="${ctxStatic }/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
	<script src="${ctxStatic }/layer/layer.js" type="text/javascript"></script>
  	<script type="text/javascript">
  		
  		//删除事件
  		function deleteuser(id) {
  			location.href = "del/"+id;
		}
  		
  		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").submit();
	    	return false;
	    }
  	</script>
  </head>
  
  <body>
  <ul class="nav nav-tabs">
		<li class="active"><a href="javascript:void(0);">角色管理</a></li>
		<li><a href="toAdd">添加角色</a></li>
	</ul>

	<form id="searchForm" class="breadcrumb form-search" action="${ctx}/role/list" method="post">
		<input id="pageNum" name="pageNum" type="hidden" value="${pageInfo.pageNum}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${pageInfo.pageSize}"/>
		<label>系统用户代码 ：</label><input class="input-medium" type="text" value="" />
		<label>姓名 ：</label><input class="input-medium" type="text" value="" />
		<label>手机号 ：</label><input class="input-medium" type="text" value="" />
		&nbsp;<input class="btn btn-primary" type="submit" value="查询"/>
	</form>

	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>序号</th>
			<th>编号</th>
			<th>角色编码</th>
			<th>角色名称</th>
			<th>状态</th>
			<th>备注</th>
			<th>创建时间</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>
			<c:forEach items="${pageInfo.list}" var="item" varStatus="index">
				<tr>
					<td>${index.index+1 }</td>
					<td>${item.id}</td>
					<td>${item.rolecode}</td>
					<td>${item.rolename}</td>
					<td>
					<c:if test="${item.validstatus  == true}">
						有效
					</c:if>
					<c:if test="${item.validstatus == false}">
						无效
					</c:if>
					</td>
					<td>${item.remark}</td>
					<td><fmt:formatDate value="${item.createtime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>
					<a href="toAdd?id=${item.id}">修改</a>
					<a href="#" onclick="deleteuser('${item.id}')">删除</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<div class="pagination">
		${fnz:pageStr(pageInfo)}
	</div>

  </body>
</html>
